<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Classes  Reference</title>
    <link rel="stylesheet" type="text/css" href="css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="css/highlight.css" />
    <meta charset='utf-8'>
    <script src="js/jquery.min.js" defer></script>
    <script src="js/jazzy.js" defer></script>
    
  </head>
  <body>
    <a name="//apple_ref/objc/Section/Classes" class="dashAnchor"></a>
    <a title="Classes  Reference"></a>
    <header>
      <div class="content-wrapper">
        <p><a href="index.html">OHMySQL Docs</a> (89% documented)</p>
        <p class="header-right"><a href="https://github.com/oleghnidets/OHMySQL"><img src="img/gh.png"/>View on GitHub</a></p>
      </div>
    </header>
    <div class="content-wrapper">
      <p id="breadcrumbs">
        <a href="index.html">OHMySQL Reference</a>
        <img id="carat" src="img/carat.png" />
        Classes  Reference
      </p>
    </div>
    <div class="content-wrapper">
      <nav class="sidebar">
        <ul class="nav-groups">
          <li class="nav-group-name">
            <a href="Categories.html">Categories</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="Categories/NSObject(Mapping).html">NSObject(Mapping)</a>
              </li>
              <li class="nav-group-task">
                <a href="Categories/NSString(Escaping).html">NSString(Escaping)</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="Classes.html">Classes</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="Classes/OHMySQLContainer.html">OHMySQLContainer</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/OHMySQLQueryContext.html">OHMySQLQueryContext</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/OHMySQLQueryRequest.html">OHMySQLQueryRequest</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/OHMySQLQueryRequestFactory.html">OHMySQLQueryRequestFactory</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/OHMySQLStore.html">OHMySQLStore</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/OHMySQLStoreCoordinator.html">OHMySQLStoreCoordinator</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/OHMySQLTimeline.html">OHMySQLTimeline</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/OHMySQLUser.html">OHMySQLUser</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/OHSSLConfig.html">OHSSLConfig</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="Constants.html">Constants</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="Constants.html#/c:@OHJoinFull">OHJoinFull</a>
              </li>
              <li class="nav-group-task">
                <a href="Constants.html#/c:@OHJoinInner">OHJoinInner</a>
              </li>
              <li class="nav-group-task">
                <a href="Constants.html#/c:@OHJoinLeft">OHJoinLeft</a>
              </li>
              <li class="nav-group-task">
                <a href="Constants.html#/c:@OHJoinRight">OHJoinRight</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="Enums.html">Enumerations</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="Enums/CharsetEncoding.html">CharsetEncoding</a>
              </li>
              <li class="nav-group-task">
                <a href="Enums/OHProtocolType.html">OHProtocolType</a>
              </li>
              <li class="nav-group-task">
                <a href="Enums/OHRefreshOptions.html">OHRefreshOptions</a>
              </li>
              <li class="nav-group-task">
                <a href="Enums/OHResultErrorType.html">OHResultErrorType</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="Protocols.html">Protocols</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="Protocols/OHMappingProtocol.html">OHMappingProtocol</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="Functions.html">Functions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="Functions.html#/c:@F@MySQLCharsetForEncoding">MySQLCharsetForEncoding</a>
              </li>
              <li class="nav-group-task">
                <a href="Functions.html#/c:@F@NSStringEncodingFromCharsetEncoding">NSStringEncodingFromCharsetEncoding</a>
              </li>
            </ul>
          </li>
        </ul>
      </nav>
      <article class="main-content">
        <section>
          <section class="section">
            <h1>Classes</h1>
            <p>The following classes are available globally.</p>

          </section>
          <section class="section task-group-section">
            <div class="task-group">
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:objc(cs)OHMySQLQueryRequest"></a>
                    <a name="//apple_ref/objc/Class/OHMySQLQueryRequest" class="dashAnchor"></a>
                    <a class="token" href="#/c:objc(cs)OHMySQLQueryRequest">OHMySQLQueryRequest</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>An instance of OHMySQLQueryRequest describes SQL query used to retrieve data from a MySQL store.</p>

                        <a href="Classes/OHMySQLQueryRequest.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Objective-C</p>
                          <pre class="highlight objective_c"><code><span class="k">@interface</span> <span class="nc">OHMySQLQueryRequest</span> <span class="p">:</span> <span class="nc">NSObject</span></code></pre>

                        </div>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">class</span> <span class="kt">OHMySQLQueryRequest</span> <span class="p">:</span> <span class="kt">NSObject</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:objc(cs)OHMySQLStore"></a>
                    <a name="//apple_ref/objc/Class/OHMySQLStore" class="dashAnchor"></a>
                    <a class="token" href="#/c:objc(cs)OHMySQLStore">OHMySQLStore</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>An object of this class contains details about a store MySQL.</p>

                        <a href="Classes/OHMySQLStore.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Objective-C</p>
                          <pre class="highlight objective_c"><code><span class="k">@interface</span> <span class="nc">OHMySQLStore</span> <span class="p">:</span> <span class="nc">NSObject</span></code></pre>

                        </div>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">class</span> <span class="kt">OHMySQLStore</span> <span class="p">:</span> <span class="kt">NSObject</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:objc(cs)OHMySQLTimeline"></a>
                    <a name="//apple_ref/objc/Class/OHMySQLTimeline" class="dashAnchor"></a>
                    <a class="token" href="#/c:objc(cs)OHMySQLTimeline">OHMySQLTimeline</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>An instance of OHMySQLTimeline represents lifecycle of the query.</p>

                        <a href="Classes/OHMySQLTimeline.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Objective-C</p>
                          <pre class="highlight objective_c"><code><span class="k">@interface</span> <span class="nc">OHMySQLTimeline</span> <span class="p">:</span> <span class="nc">NSObject</span></code></pre>

                        </div>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">class</span> <span class="kt">OHMySQLTimeline</span> <span class="p">:</span> <span class="kt">NSObject</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:objc(cs)OHMySQLUser"></a>
                    <a name="//apple_ref/objc/Class/OHMySQLUser" class="dashAnchor"></a>
                    <a class="token" href="#/c:objc(cs)OHMySQLUser">OHMySQLUser</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>The entity that has authority to use a store MySQL.</p>

                        <a href="Classes/OHMySQLUser.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Objective-C</p>
                          <pre class="highlight objective_c"><code><span class="k">@interface</span> <span class="nc">OHMySQLUser</span> <span class="p">:</span> <span class="nc">NSObject</span></code></pre>

                        </div>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">class</span> <span class="kt">OHMySQLUser</span> <span class="p">:</span> <span class="kt">NSObject</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:objc(cs)OHSSLConfig"></a>
                    <a name="//apple_ref/objc/Class/OHSSLConfig" class="dashAnchor"></a>
                    <a class="token" href="#/c:objc(cs)OHSSLConfig">OHSSLConfig</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>This class is used for establishing secure connections using SSL.</p>
<div class="aside aside-note">
    <p class="aside-title">Note</p>
    Please, see <a href="http://dev.mysql.com/doc/refman/5.7/en/mysql-ssl-set.html">http://dev.mysql.com/doc/refman/5.7/en/mysql-ssl-set.html</a> for more details.

</div>

                        <a href="Classes/OHSSLConfig.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Objective-C</p>
                          <pre class="highlight objective_c"><code><span class="k">@interface</span> <span class="nc">OHSSLConfig</span> <span class="p">:</span> <span class="nc">NSObject</span></code></pre>

                        </div>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">class</span> <span class="kt">OHSSLConfig</span> <span class="p">:</span> <span class="kt">NSObject</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:objc(cs)OHMySQLContainer"></a>
                    <a name="//apple_ref/objc/Class/OHMySQLContainer" class="dashAnchor"></a>
                    <a class="token" href="#/c:objc(cs)OHMySQLContainer">OHMySQLContainer</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Represents a main context and store coordinator.</p>

                        <a href="Classes/OHMySQLContainer.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Objective-C</p>
                          <pre class="highlight objective_c"><code><span class="k">@interface</span> <span class="nc">OHMySQLContainer</span> <span class="p">:</span> <span class="nc">NSObject</span></code></pre>

                        </div>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">class</span> <span class="kt">OHMySQLContainer</span> <span class="p">:</span> <span class="kt">NSObject</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:objc(cs)OHMySQLQueryContext"></a>
                    <a name="//apple_ref/objc/Class/OHMySQLQueryContext" class="dashAnchor"></a>
                    <a class="token" href="#/c:objc(cs)OHMySQLQueryContext">OHMySQLQueryContext</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>An instance of this class is responsible for executing queries, saving/updating/deleting objects.</p>

                        <a href="Classes/OHMySQLQueryContext.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Objective-C</p>
                          <pre class="highlight objective_c"><code><span class="k">@interface</span> <span class="nc">OHMySQLQueryContext</span> <span class="p">:</span> <span class="nc">NSObject</span></code></pre>

                        </div>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">class</span> <span class="kt">OHMySQLQueryContext</span> <span class="p">:</span> <span class="kt">NSObject</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:objc(cs)OHMySQLQueryRequestFactory"></a>
                    <a name="//apple_ref/objc/Class/OHMySQLQueryRequestFactory" class="dashAnchor"></a>
                    <a class="token" href="#/c:objc(cs)OHMySQLQueryRequestFactory">OHMySQLQueryRequestFactory</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Convenience class for making specific OHMySQLQueryRequest instances.</p>

                        <a href="Classes/OHMySQLQueryRequestFactory.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Objective-C</p>
                          <pre class="highlight objective_c"><code><span class="k">@interface</span> <span class="nc">OHMySQLQueryRequestFactory</span> <span class="p">:</span> <span class="nc">NSObject</span></code></pre>

                        </div>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">class</span> <span class="kt">OHMySQLQueryRequestFactory</span> <span class="p">:</span> <span class="kt">NSObject</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:objc(cs)OHMySQLStoreCoordinator"></a>
                    <a name="//apple_ref/objc/Class/OHMySQLStoreCoordinator" class="dashAnchor"></a>
                    <a class="token" href="#/c:objc(cs)OHMySQLStoreCoordinator">OHMySQLStoreCoordinator</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Undocumented</p>

                        <a href="Classes/OHMySQLStoreCoordinator.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Objective-C</p>
                          <pre class="highlight objective_c"><code><span class="k">@interface</span> <span class="nc">OHMySQLStoreCoordinator</span> <span class="p">:</span> <span class="nc">NSObject</span>

<span class="c1">/// Nonnull after connection with DB. 
</span><span class="k">@property</span> <span class="p">(</span><span class="n">nonatomic</span><span class="p">,</span> <span class="n">strong</span><span class="p">,</span> <span class="n">readonly</span><span class="p">,</span> <span class="n">nullable</span><span class="p">)</span> <span class="n"><a href="Classes/OHMySQLStore.html">OHMySQLStore</a></span> <span class="o">*</span><span class="n">store</span><span class="p">;</span>

<span class="c1">/// Nonnull after connection with DB.
</span><span class="k">@property</span> <span class="p">(</span><span class="n">nonatomic</span><span class="p">,</span> <span class="n">strong</span><span class="p">,</span> <span class="n">readonly</span><span class="p">,</span> <span class="n">nullable</span><span class="p">)</span> <span class="n"><a href="Classes/OHMySQLUser.html">OHMySQLUser</a></span> <span class="o">*</span><span class="n">user</span><span class="p">;</span>

<span class="c1">/// Nonnull after connection with DB. You don't need to use this property at all.
</span><span class="k">@property</span> <span class="p">(</span><span class="n">readonly</span><span class="p">,</span> <span class="n">nullable</span><span class="p">)</span> <span class="kt">void</span> <span class="o">*</span><span class="n">mysql</span><span class="p">;</span>

<span class="c1">/// Pings the server and indicates whether the connection to the server is working.
</span><span class="k">@property</span> <span class="p">(</span><span class="n">assign</span><span class="p">,</span> <span class="n">readonly</span><span class="p">,</span> <span class="n">getter</span><span class="o">=</span><span class="n">isConnected</span><span class="p">)</span> <span class="n">BOOL</span> <span class="n">connected</span><span class="p">;</span>

<span class="c1">/// One of the protocols. Needs to be set before calling -connect.
</span><span class="k">@property</span> <span class="p">(</span><span class="n">nonatomic</span><span class="p">,</span> <span class="n">assign</span><span class="p">)</span> <span class="n"><a href="Enums/OHProtocolType.html">OHProtocolType</a></span> <span class="n">protocol</span><span class="p">;</span>

<span class="c1">/// The default character set for the current connection. By default UTF-8.
</span><span class="k">@property</span> <span class="p">(</span><span class="n">nonatomic</span><span class="p">,</span> <span class="n">assign</span><span class="p">)</span> <span class="n"><a href="Enums/CharsetEncoding.html">CharsetEncoding</a></span> <span class="n">encoding</span><span class="p">;</span>

<span class="k">-</span> <span class="p">(</span><span class="n">nonnull</span> <span class="n">instancetype</span><span class="p">)</span><span class="nf">initWithUser</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n"><a href="Classes/OHMySQLUser.html">OHMySQLUser</a></span> <span class="o">*</span><span class="p">)</span><span class="nv">user</span><span class="p">;</span>

<span class="c1">/// Attempts to establish a connection to a MySQL database engine. Also tries establish SSL connection if it is specified.
</span><span class="k">-</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="n">connect</span><span class="p">;</span>

<span class="cm">/**
 *  @param database Name of the target db.
 *
 *  @return Zero for success. Nonzero if an error occurred (see enum).
 */</span>
<span class="k">-</span> <span class="p">(</span><span class="n"><a href="Enums/OHResultErrorType.html">OHResultErrorType</a></span><span class="p">)</span><span class="nf">selectDataBase</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n">NSString</span> <span class="o">*</span><span class="p">)</span><span class="nv">database</span><span class="p">;</span>

<span class="c1">/// Closes a previously opened connection.
</span><span class="k">-</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="n">disconnect</span><span class="p">;</span>

<span class="cm">/**
 *  Asks the database server to shut down. The connected user must have the SHUTDOWN privilege.
 *
 *  @return Zero for success. Nonzero if an error occurred.
 */</span>
<span class="k">-</span> <span class="p">(</span><span class="n"><a href="Enums/OHResultErrorType.html">OHResultErrorType</a></span><span class="p">)</span><span class="n">shutdown</span><span class="p">;</span>

<span class="cm">/**
 *  Flushes tables or caches, or resets replication server information. The connected user must have the RELOAD privilege.
 *
 *  @param options A bit mask composed from any combination.
 *
 *  @return Zero for success. Nonzero if an error occurred (see enum).
 */</span>
<span class="k">-</span> <span class="p">(</span><span class="n"><a href="Enums/OHResultErrorType.html">OHResultErrorType</a></span><span class="p">)</span><span class="nf">refresh</span><span class="p">:(</span><span class="n"><a href="Enums/OHRefreshOptions.html">OHRefreshOptions</a></span><span class="p">)</span><span class="nv">options</span><span class="p">;</span>

<span class="cm">/**
 *  Checks whether the connection to the server is working. If the connection has gone down and auto-reconnect is enabled an attempt to reconnect is made.
 *
 *  @return Zero if the connection to the server is active. Nonzero if an error occurred. A nonzero return does not indicate whether the MySQL server itself is down; the connection might be broken for other reasons such as network problems.
 */</span>
<span class="k">-</span> <span class="p">(</span><span class="n"><a href="Enums/OHResultErrorType.html">OHResultErrorType</a></span><span class="p">)</span><span class="n">pingMySQL</span> <span class="n">__attribute__</span><span class="p">((</span><span class="n">warn_unused_result</span><span class="p">));</span>

<span class="k">@end</span></code></pre>

                        </div>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">class</span> <span class="kt">OHMySQLStoreCoordinator</span> <span class="p">:</span> <span class="kt">NSObject</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
          </section>
        </section>
        <section id="footer">
          <p>&copy; 2018 <a class="link" href="https://github.com/oleghnidets" target="_blank" rel="external">Oleg</a>. All rights reserved. (Last updated: 2018-05-02)</p>
          <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.2</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
        </section>
      </article>
    </div>
  </body>
</div>
</html>
